import request from '@/utils/request'

export function getThreeTokenApi(params) {
  return request({
    url: 'https://api.xiaoe-tech.com/token',
    method: 'get',
    params
  })
}

export function getUserListApi(data) {
  return request({
    url: 'https://api.xiaoe-tech.com/xe.user.info.get/1.0.0',
    method: 'post',
    data
  })
}

export function loginApi(data) {
  return request({
    url: '/admin/login',
    method: 'post',
    data
  })
}

export function getQnTokenApi(data) {
  return request({
    url: '/file/getQiNiuAutoToken',
    method: 'get',
    data
  })
}

export function getQnFileApi(data) {
  return request({
    url: '/file/uploadVideo',
    method: 'post',
    data
  })
}

export function commissionRateUpdateApi(data) {
  return request({
    url: `/admin/config/commissionRate/update?commissionRate=${data.commissionRate}`,
    method: 'post'
  })
}

export function commissionRateDetailApi(data) {
  return request({
    url: '/admin/config/commissionRate/detail',
    method: 'post',
    data
  })
}

export function withdrawListApi(data) {
  return request({
    url: '/admin/withdraw/pageInfo',
    method: 'POST',
    data
  })
}

export function withdrawApproveApi(data) {
  return request({
    url: '/admin/withdraw/approve',
    method: 'POST',
    data
  })
}

export function getWalletDetailApi(data) {
  return request({
    url: `/admin/wallet/detail/${data.id}`,
    method: 'POST',
    data
  })
}

export function getCreditListApi(data) {
  return request({
    url: `/user/creditList`,
    method: 'POST',
    data
  })
}

